package com.ouheng.shop.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

import com.ouheng.shop.dao.BeforehandDao;
import com.ouheng.shop.domain.BeforehandDO;
import com.ouheng.shop.service.BeforehandService;



@Service
public class BeforehandServiceImpl implements BeforehandService {
	@Autowired
	private BeforehandDao beforehandDao;
	
	@Override
	public BeforehandDO get(Long id){
		return beforehandDao.get(id);
	}
	
	@Override
	public List<BeforehandDO> list(Map<String, Object> map){
		return beforehandDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return beforehandDao.count(map);
	}
	
	@Override
	@Transactional
	public int save(BeforehandDO beforehand){
		return beforehandDao.save(beforehand);
	}
	
	@Override
	@Transactional
	public int update(BeforehandDO beforehand){
		return beforehandDao.update(beforehand);
	}
	
	@Override
	@Transactional
	public int remove(Long id){
		return beforehandDao.remove(id);
	}
	
	@Override
	@Transactional
	public int batchRemove(Long[] ids){
		return beforehandDao.batchRemove(ids);
	}
	
}
